package br.com.winesys.geta.databinding.componentBinder;

import java.io.File;
import br.com.winesys.geta.databinding.ComponentBinder;
import br.com.winesys.geta.databinding.component.selector.FileSelector;

public final class FileSelectorBinder implements ComponentBinder<FileSelector> {

	private static final ComponentBinder<FileSelector> INSTANCE = new FileSelectorBinder();

	public static ComponentBinder<FileSelector> getInstance() {
		return INSTANCE;
	}

	private FileSelectorBinder() {
	}

	@Override
	public Object read(FileSelector component) {
		return component.getFile();
	}

	@Override
	public void write(FileSelector component, Object value) {
		component.setFile((File) value);
	}
}
